package com.fdb.efp.cus.service.facade;

import java.util.List;

import com.fdb.efp.cus.service.vo.CusHandoverAppVO;
import com.fdb.efp.cus.service.vo.CusHandoverLstVO;

/**
 * <p>
 * Description:客户移交申请
 * <p>
 * 
 * @author chenqm1
 * @date 2018-05-14
 */
public interface CusHandoverAppService {

	public List<CusHandoverAppVO> queryAllOwner(CusHandoverAppVO cusHandoverAppVo);

	public List<CusHandoverAppVO> queryAllCurrOrg(CusHandoverAppVO cusHandoverAppVo);

	public List<CusHandoverAppVO> queryAllCurrDownOrg(CusHandoverAppVO cusHandoverAppVo);

	public int insertCusHandoverApp(CusHandoverAppVO inCusHandoverAppVo);

	public int deleteByPk(CusHandoverAppVO cusHandoverAppVo);

	public int updateByPk(CusHandoverAppVO cusHandoverAppVo);

	public CusHandoverAppVO queryByPk(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 插入客户移交申请和移交明细信息
	 * 
	 * @param inCusHandoverAppVo
	 * @param cusHandoverLstVOList
	 *            移交明细信息
	 * @return
	 */
	public int insertCusHandoverAppAndDetailLst(CusHandoverAppVO inCusHandoverAppVo, List<CusHandoverLstVO> cusHandoverLstVOList);

	/**
	 * 查询客户经理下是否有 移交范围为按客户经理的移交未结束
	 * 
	 * @param cusIndivVO
	 * @return
	 */
	public int queryHandoverCusManager(CusHandoverAppVO inCusHandoverAppVo);

	/**
	 * 查询当前自己名下所有的客户移交审批
	 * 
	 * @param cusHandoverAppVo
	 * @return
	 */
	public List<CusHandoverAppVO> queryApprovalAllOwner(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 查询当前登录人所在机构的客户移交审批
	 * 
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverAppVO> queryApprovalAllCurrOrg(CusHandoverAppVO cusHandoverApp);

	/**
	 * 查询当前登录所在机构及下属机构的客户移交审批
	 * 
	 * @param cusHandoverApp
	 * @return
	 */
	public List<CusHandoverAppVO> queryApprovalAllCurrDownOrg(CusHandoverAppVO cusHandoverApp);

	/**
	 * 查询登录人名下所有的客户移交接收
	 * 
	 * @param cusHandoverAppVo
	 * @return
	 */
	public List<CusHandoverAppVO> queryRecvAllOwner(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 查询登录人所在机构的客户移交接收
	 * 
	 * @param cusHandoverAppVo
	 * @return
	 */
	public List<CusHandoverAppVO> queryRecvAllCurrOrg(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 查询登录人所在机构及下属机构的 客户移交接收
	 * 
	 * @param cusHandoverAppVo
	 * @return
	 */
	public List<CusHandoverAppVO> queryRecvAllCurrDownOrg(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 根据流水号 更新状态
	 * 
	 * @param cusHandoverAppVo
	 * @return
	 */
	public int updateStatusBySernoCondition(CusHandoverAppVO cusHandoverAppVo);

	/**
	 * 日终跑批移交接收成功的客户业务资料信息
	 * 
	 * @return
	 */
	public int autoUpdateHandoverCusBusiness() throws Exception;
}
